import org.jasig.cas.authentication.handler.DefaultPasswordEncoder;
import org.jasig.cas.authentication.handler.PasswordEncoder;
import org.junit.Test;

/**
 * Created by Doobo on 2018/2/9.
 */
public class PasswordController {

    @Test
    public void autoPassword(){
        final String password = "root";
        final String salt = "1";
        PasswordEncoder passwordEncoder = new DefaultPasswordEncoder("MD5");
        System.out.println(passwordEncoder.encode(password));
        final String enc = passwordEncoder.encode(
                passwordEncoder.encode(password)+salt
        );
        System.out.println(enc);
    }
}